import { Column, Entity, PrimaryGeneratedColumn, BaseEntity, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from 'typeorm';
@Entity('erp_supplier')
export class Supplier extends BaseEntity {
    @PrimaryGeneratedColumn()
    id: number;
    @Column()
    name: string;
    @Column()
    code: string;
    @Column()
    contacts: string;
    @Column()
    mobile: string;
    @Column()
    email: string;
    @Column()
    address: string;
    @Column()
    categoryIds: string;
    @Column()
    creditCode: string;
    @Column()
    tin: string;
    @Column()
    bank: string;
    @Column()
    account: string;
    @Column()
    bankNo: string;
    @Column()
    remark: string;
    @DeleteDateColumn({ nullable: true }) // TypeORM 内置软删除字段
    deletedTime: Date;
    @Column('int')
    createAdminId: number;
    @CreateDateColumn({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
    createTime: Date;
    @UpdateDateColumn({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
    updateTime: Date;
}

